package ar.edu.unsam.algo3.plantasvszombies.ui.windows

import org.uqbar.arena.layout.HorizontalLayout
import org.uqbar.arena.layout.VerticalLayout
import org.uqbar.arena.widgets.Button
import org.uqbar.arena.widgets.Label
import org.uqbar.arena.widgets.Panel
import org.uqbar.arena.windows.Dialog
import org.uqbar.arena.windows.WindowOwner

class MensajeWindow extends Dialog<String> {

	new(WindowOwner parent, String model) {
		super(parent, model)
	}

	override protected createFormPanel(Panel mainPanel) {
		mainPanel.setLayout(new VerticalLayout)
		new Label(mainPanel).setText(modelObject).setWidth(300)
	}

	override protected addActions(Panel actionsPanel) {
		actionsPanel.setLayout(new HorizontalLayout)
		new Button(actionsPanel).setCaption("Aceptar").onClick[|accept]
		new Button(actionsPanel).setCaption("Cancelar").onClick[|cancel]
	}

}
